Skip to content

[PWGHF] First draft of Omegac0 to OmegaPi QA workflow - #18126

Draft
mtorresc15 wants to merge 15 commits into
AliceO2Group:masterfrom
mtorresc15:omegac0-qa
Draft

mtorresc15 wants to merge 15 commits into
AliceO2Group:masterfrom
mtorresc15:omegac0-qa

Conversation

@mtorresc15

Copy link
Copy Markdown
Contributor

First draft of the QA workflow for the Omegac0 to OmegaPi analysis.

This PR introduces dedicated QA versions of the candidate selector, tree creator, analysis task, and ML response to allow a more detailed validation of the Omegac0 to OmegaPi analysis workflow.

The main additions are:

  • Candidate selector: QA monitoring of the selection steps, with dedicated DCAFitter and KFParticle processing.
  • Tree creator: dedicated QA output tables containing additional reconstruction and selection information for DCAFitter and KFParticle candidates.
  • ML response: common and reconstruction-specific ML input features for both DCAFitter and KFParticle.
  • Analysis task: processing DCAFitter and KFParticle candidates, with and without ML selections.

The implementation is based on the existing Omegac0 to OmegaPi analysis workflow and is intended to facilitate validation and comparison of the DCAFitter and KFParticle reconstruction and selection strategies.

This PR is opened as a draft for preliminary review and feedback.

@github-actions github-actions Bot added the pwghf PWG-HF label Sep 30, 2026
@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 3 warnings, 🔕 0 disabled

@github-actions github-actions Bot changed the title First draft of Omegac0 to OmegaPi QA workflow [PWGHF] First draft of Omegac0 to OmegaPi QA workflow Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new executables lack build registration, and selector issues can alter cuts or fatally terminate ML workflows.

Review effort: Balanced
Findings: 4 High severity · 2 Medium severity · 1 Low severity

Open (7)
What changed in this PR

Adds QA workflows for comparing DCAFitter and KFParticle Ωc⁰→Ωπ reconstruction.

Changes:

  • Adds QA candidate selection and output trees.
  • Adds reconstruction-specific ML features.
  • Adds data/MC analysis modes with optional ML and centrality.
File Description
PWGHF/​TableProducer/​treeCreatorOmegac0ToOmegaPiQa.cxx Defines detailed QA output tables.
PWGHF/​TableProducer/​candidateSelectorOmegac0ToOmegaPiQa.cxx Implements selection, PID, ML, and QA monitoring.
PWGHF/​D2H/​Tasks/​taskOmegac0ToOmegaPiQa.cxx Adds data and MC analysis modes.
PWGHF/​Core/​HfMlResponseOmegacToOmegaPiQa.h Defines DCAFitter and KFParticle ML features.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread PWGHF/D2H/Tasks/taskOmegac0ToOmegaPiQa.cxx
Comment thread PWGHF/TableProducer/candidateSelectorOmegac0ToOmegaPiQa.cxx
Comment thread PWGHF/TableProducer/candidateSelectorOmegac0ToOmegaPiQa.cxx
Comment thread PWGHF/TableProducer/treeCreatorOmegac0ToOmegaPiQa.cxx
Comment thread PWGHF/TableProducer/candidateSelectorOmegac0ToOmegaPiQa.cxx Outdated
Comment thread PWGHF/TableProducer/candidateSelectorOmegac0ToOmegaPiQa.cxx Outdated
Comment thread PWGHF/Core/HfMlResponseOmegacToOmegaPiQa.h Outdated
inputFeatures.emplace_back(candidate.GETTER()); \
break; \
}
namespace o2::analysis

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace o2::analysis
namespace o2::analysis

// Mass window
Configurable<double> v0MassWindow{"v0MassWindow", 0.01, "V0 mass window"};
Configurable<double> cascadeMassWindow{"cascadeMassWindow", 0.01, "Cascade mass window"};
Configurable<double> invMassCharmBaryonMin{"invMassCharmBaryonMin", 2.3, "Lower limit invariant mass spectrum charm baryon"}; // 2.4 Omegac0 only

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configurable<double> invMassCharmBaryonMin{"invMassCharmBaryonMin", 2.3, "Lower limit invariant mass spectrum charm baryon"}; // 2.4 Omegac0 only
Configurable<double> invMassCharmBaryonMin{"invMassCharmBaryonMin", 2.3, "Lower limit invariant mass spectrum charm baryon"};

Comment on lines +134 to +135
Configurable<bool> usePidTpcOnly{"usePidTpcOnly", false, "Perform PID using only TPC"};
Configurable<bool> usePidTpcTofCombined{"usePidTpcTofCombined", true, "Perform PID using TPC & TOF"};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configurable<bool> usePidTpcOnly{"usePidTpcOnly", false, "Perform PID using only TPC"};
Configurable<bool> usePidTpcTofCombined{"usePidTpcTofCombined", true, "Perform PID using TPC & TOF"};
Configurable<bool> usePidTpcOnly{"usePidTpcOnly", true, "Perform PID using only TPC"};
Configurable<bool> usePidTpcTofCombined{"usePidTpcTofCombined", false, "Perform PID using TPC or TOF"};

Comment on lines +261 to +263
// registry.add("hSelMassLam", "hSelMassLam;status;entries", {HistType::kTH1D, {axisSel}});
// registry.add("hSelMassCasc", "hSelMassCasc;status;entries", {HistType::kTH1D, {axisSel}});
// registry.add("hSelMassCharmBaryon", "hSelMassCharmBaryon;status;entries", {HistType::kTH1D, {axisSel}});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// registry.add("hSelMassLam", "hSelMassLam;status;entries", {HistType::kTH1D, {axisSel}});
// registry.add("hSelMassCasc", "hSelMassCasc;status;entries", {HistType::kTH1D, {axisSel}});
// registry.add("hSelMassCharmBaryon", "hSelMassCharmBaryon;status;entries", {HistType::kTH1D, {axisSel}});

Comment on lines +429 to +437
// Distance of Closest Approach(DCA)
if (candidate.dcaV0Dau() > dcaV0DauMax) {
return false;
}
registry.fill(HIST("hSelStatusLf"), 8.0);

if (candidate.dcaCascDau() > dcaCascDauMax) {
return false;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two quantities always positive?

Comment on lines +306 to +307
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels>;
using MyEventTableWithFT0M = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels>;
using MyEventTableWithFT0M = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels>;
using MyEventTableWithFT0M = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;

Use proper names for these two tables, e.g., CollsSel

Comment on lines +426 to +428
} else {
// Not available yet
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else {
// Not available yet
}
}

Comment on lines +291 to +293
Produces<o2::aod::HfOmegac0ToOmegaPiLites> rowCandidateLite;
Produces<o2::aod::HfKfOmegacFulls> rowKfCandidateFull;
Produces<o2::aod::HfKfOmegacLites> rowKfCandidateLite;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have only one table for the DCA method and one for the KFParticle one

}

template <int svReco, int tableSize, bool useCentrality, typename MyEventTableType, typename T>
void fillCandidate(const T& candidate, int8_t flagMc, int8_t originMc, bool collisionMatched, float centrality = -999.f)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here all the particles are filled in the tree, without checking if the particle pass the selections. Please have a look at how to implement the check to select only candidates passing the cuts. You can also do that with a filter on the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

3 participants